<!DOCTYPE HTML>
<html>

<!-- Mirrored from www.walletkit.com/docs by HTTrack Website Copier/3.x [XR&CO'2010], Sat, 01 Dec 2012 19:13:04 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>WalletKit - Documentation</title>
<!-- External Style Sheet -->
<link rel="stylesheet" href="static/styles/common_style.css" type="text/css"  />
<link rel="stylesheet" href="static/styles/syntax_highlighter.css" type="text/css"  />
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" href="static/favicon.ico">


<script src="static/js/lib/jquery-1.7.2.min.js" type="text/javascript"></script>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-35991948-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>


</head>

<body>

	    <div class="header"> 
        <a href="index.html" class="logo"><img src="static/images/wallet_kit_logo.png" /></a>
        <div class="header_right">
            <ul class="navigation" >
 
                        <a class="" href="http://blog.walletkit.com/"><li>BLOG</li></a>
            <a class="nav_selected" href="docs.html"><li>DOCUMENTATION</li></a>
                 <a class="" href="http://walletkit.totemapp.com/team"><li>CONTACT</li></a>

            </ul>
           
            
        </div>
        </div><!-- end .header -->

	<div class="container">
    
    	  <div class="left_nav" style="display:none;">
            <a href="#" class="left_nav_button sub_selected"><img src="static/images/list.png"/></a>
            <div class="divider_line"></div>
            <a href="logind693.html" class="left_nav_button "><img src="static/images/settings.png"/></a>
        </div><!-- end .left_nav -->
  
        <div class="left_content">
        	<!--Shadow divider-->
            <div class="shadow_divider"></div>
        
        	<!-- Top Clip -->
        	<div class="top_clip">
            	<div class="clip_text">API Documentation</div>
            </div>
            <div class="clip_shadow"></div>
           
          <div style="overflow: scroll;position: absolute;bottom: 0;top: 70px;width: 290px;">  
            <div class="clearfloat"></div>
            
            <div class="sub_nav">
            	<div class="sub_nav_title">Pass Template</div>
            	<ul>
                	<a href="#cp" class="s_nav"><li class="selected">POST</li></a>
                    <a href="#lp" class="s_nav"><li >GET</li></a>
                </ul>
            </div><!-- end .sub_nav -->
            
            <div class="clearfloat"></div>
            
             <div class="sub_nav">
            	<div class="sub_nav_title">Pass</div>
            	<ul>
                	<a href="#ci" class="s_nav"><li>POST</li></a>
                    <a href="#lt" class="s_nav"><li>GET</li></a>
                    <a href="#dt" class="s_nav"><li>DELETE</li></a>
                    <a href="#up" class="s_nav"><li>PUT</li></a>
                </ul>
            </div><!-- end .sub_nav -->


               <div class="sub_nav">
                <div class="sub_nav_title">Pass Design and Rules</div>
                <ul>
                    <a href="#bp" class="s_nav"><li>Boarding Pass</li></a>
                    <a href="#et" class="s_nav"><li>Event Tickets</li></a>
                    <a href="#sc" class="s_nav"><li>Store Card</li></a>
                    <a href="#cop" class="s_nav"><li>Coupon</li></a>
                    <a href="#gen" class="s_nav"><li>Generic</li></a>

                </ul>
            </div><!-- end .sub_nav -->


            </div>
            
        </div><!-- end .left_content -->
        
        <div class="right_content">
        
        <div class="title">
        <div class="title_text">Rest API</div>
        </div>
        <div class="top_shadow" id="scroll_shadow"></div>
        
        	<div id="scroll_wrapper" class="right_wrapper">
         	
            <div class="api_wrap">
            
            <p class="api_title" id="cp">Creating a Pass model</p>
            <p class="api_details">A Pass template is a one time creation for defining looks and default values of a pass. A Pass template can be created by sending a http <strong>POST</strong> request to <strong>https://api.walletkit.com/v1/passes</strong></p>
            
            <div class="half_line"></div>
            
            <p class="api_sub_header">Headers</p>
            
            <p class="api_details">The request headers are <strong>content-type, brand-id</strong> and <strong>api-key</strong>. Content-Type should be set as <strong>application/json</strong>. Your <strong>brand-id</strong> and <strong>api-key</strong> can be found at settings page.</p>
            
            <pre class="prettyprint lang-html">

        -H <span class="str">"brand-id: <span class="kwd">&lt;Your brand-id&gt;</span>"  \</span>
        -H <span class="str">"api-key:  <span class="kwd">&lt;Your api-key&gt;</span> "  \</span>
        -H <span class="str">"Content-Type: application/json"  \</span>
    		</pre>
            
            <p class="api_sub_header">Json POST data</p>
            <p class="api_details">The json key and value to be sent with the POST request is documented in the table below.</p>
            
            <table class="api_table" border="0" cellpadding="0" cellspacing="0">
            	<tr>
                	<th class="tb_title" colspan="5">json data</th>
                </tr>
                <tr class="tb_head">
                	<td>Keys</td>
                    <td>Value</td>
                    <td>Description</td>
                    <td>Type</td>
                    <td>Required</td>
                </tr>
                <tr>
                	<td>description</td>
                    <td>Description of the pass</td>
                    <td>Hidden value</td>
                    <td>String</td>
                    <td>YES</td>
                </tr>
                
                <tr>
            <td>pass_type</td>
            <td>boardingPass <br/>coupon <br/> eventTicket<br/> storeCard <br/>generic</td>
            <td>Passes of each pass type has specific number of fields,layout of fields and nature of images <a href="#bp"><strong style="font-weight: bolder;color: #1F99ED;text-decoration:underline;">allowed</strong></a>. <br/><br/>The visual design and layout changes for each pass type.</td>
            <td >String</td>  
            <td >YES</td>      
    

        </tr>
         <tr>
            <td >transittype</td>
          <td >PKTransitTypeAir  <br/> PKTransitTypeTrain  <br/> PKTransitTypeBus  <br/> PKTransitTypeBoat  <br/> PKTransitTypeGeneric</td>

            <td >Type of transit</td>
            <td >String</td>  
            <td >Required for boarding passes; otherwise not allowed</td>      
        </tr>

        <tr>
            <td >icon, background, logo, thumbnail,icon</td>
            <td >Image URL</td>
            <td >You just need to send the public URL of the image. We download the image and store it in our server</td>
            <td >String</td>  
            <td >icon image is Required.<br/> Other images are optional</td>      
    

        </tr>

       <tr>
            <td >icon2x, background2x, logo2x, thumbnail2x,strip2x</td>
            <td >Image URL</td>
            <td >Retina ready images</td>
            <td >String</td>  
            <td >Optional</td>      
    

        </tr>
        <tr>
            <td >logotext</td>
            <td >Brand name</td>
            <td >Text near the logo indicating brand name</td>
            <td >String</td>  
            <td >Optional</td>      
    

        </tr>
         <tr>
            <td >username</td>
            <td >Orgainzation name which shows in the iOS 6 mail UI when users sees the pass</td>
            <td >if not present, the username given when signing up will be used</td>
            <td >String</td>  
            <td >Optional</td>      
    

        </tr>
        <tr>
            <td >relevant_date</td>
            <td >Date and time when the pass becomes relevant</td>
            <td >For example, the start time of a movie</td>
            <td >ISO 8601 date, as a string<br/>You can generate an ISO 8601 date <a href="http://www.timestampgenerator.com/"><strong style="font-weight: bolder;color: #1F99ED;text-decoration:underline;">here</strong></a.></td>  
            <td >Optional</td>      
        </tr>
        
        <tr>
            <td >foreground_color, background_color, label_color</td>
            <td >The color which sets the visual design of the pass</td>
            <td >The foreground_color sets the color of values displayed on the pass. <br/>Likewise background_color and label_color sets the background color and label color respectively</td>
            <td >RGB value as string. Eg: rgb(218,212,212)</td>  
            <td >Optional</td>      
        </tr>
        <tr>
            <td >barcode</td>
            <td >Array of values with keys <strong>format</strong>, <strong>message</strong>, <strong>messageEncoding</strong> , <strong>alttext</strong></td>
            <td ><strong>format</strong> - Barcode format. Must be one of the following values: PKBarcodeFormatQR, PKBarcodeFormatPDF417, PKBarcodeFormatAztec, PKBarcodeFormatText.<br/><br/>  <strong>message</strong> - Message or payload to be displayed as a barcode<br/> <br/>  <strong>messageEncoding</strong> - Text encoding that is used to convert the message from the string representation to a data representation to render the barcode. The value is typically iso-8859-1, but you may use another encoding that is supported by your barcode scanner and software.<br/><br/>   <strong>alttext</strong> - Text displayed near the barcode. For example, a human-readable version of the barcode data in case the barcode doesn't scan<br/>/td>
            <td >String(for messageEncoding, IANA character set name as String)</td>  
            <td >Optional. but if barcode is present <strong>format</strong>, <strong>message</strong>, <strong>messageEncoding</strong> is required</td>      
        </tr>

        <tr>
            <td >location</td>
            <td >Array of json dictionaries with values for keys<strong> latitude</strong>, <strong>latitude</strong>, <strong>altitude</strong> , <strong>relevanttext</strong></td>
            <td ><strong>latitude, longitude, altitude</strong> - latitude, longitude and altitude of the location. Each has a key in all the json dictionary of the Array<br/><br/>   <strong>relevanttext</strong> - Description of the location. Eg: first shop on the fourth street<br/></td>
            <td >double(<strong>latitude</strong>,<strong> longitude</strong>,<strong> altitude</strong>) String(<strong>relevanttext</strong>)</td>  
            <td >Optional. but if location is present: <strong>latitude</strong>, <strong>longitude</strong> </strong> are required</td>      
        </tr>
        <tr>
            <td >headerFields, primaryFields, secondaryFields, auxiliaryFields , backFields</td>
            <td >Array of json dictionaries with values for keys<strong> label</strong>, <strong>key</strong>, <strong>value</strong> , <strong>textalignment</strong> ,<strong>changemessage</strong></td>
            <td ><strong>key</strong> - The key must be unique within the scope of the entire pass. For example, "departure-gate"<br/><br/>  <strong>label</strong> - Label text for the field<br/> <br/>  <strong>value</strong> - Default value of the field. Values can be substituted when sending individual passes<br/><br/>   <strong>textalignment</strong> - Alignment for the field's contents. Must be one of the following values: PKTextAlignmentLeft, PKTextAlignmentCenter, PKTextAlignmentRight, PKTextAlignmentJustified, PKTextAlignment- Natural<br/><br/><strong>changemessage</strong>- </strong>Optional. Format string for the alert text that is displayed when the pass is updated. The format string may contain the escape %@, which is replaced with the field's new value. For example, "Gate changed to %@."If you don't specify a change message, the user isn't notified when the field changes<br/></td>
            <td >String(localizable string, ISO 8601 date as a string, or number for <strong>value</strong>)</td>  
            <td >Optional. but if present: <strong>key</strong>, <strong>value</strong> </strong> are required<br/>f </td>      
        </tr>

                
            </table>
            
            <p class="api_sub_header">Example curl request :</p>
            
 			    <pre class="prettyprint lang-html">

    curl -X POST  <span class="str">\</span>
        -H <span class="str">"&lt;Your brand-id&gt;"  \</span>
        -H <span class="str">"&lt;Your api-key&gt;" \</span>
        -H <span class="str">"Content-Type: application/json"  \</span>
        -d <span class="str">'{
            <span class="lit">"logotext"</span> : <span class="kwd">"Brand name"</span> , 
            <span class="lit">"background"</span> : <span class="kwd">"http://www.example.com/yourBackground.png"</span>, 
            <span class="lit">"description"</span> : <span class="kwd">"Description of the pass"</span> , 
            <span class="lit">"icon"</span> : <span class="kwd">"http://www.example.com/yourIcon.png"</span> , 
            <span class="lit">"icon2x"</span> : <span class="kwd">"http://www.example.com/iconx.png"</span> ,
            <span class="lit">"barcode"</span> : { 
                    <span class="lit">"message"</span> : <span class="kwd">"123456789"</span> ,
                    <span class="lit">"format"</span> : <span class="kwd">"PKBarcodeFormatPDF417"</span> ,
                    <span class="lit">"messageEncoding"</span> : <span class="kwd">"iso-8859-1"</span> ,
            <span class="lit">"alttext"</span> : <span class="kwd">"test"</span>
            } ,
            <span class="lit">"pass_type"</span> : <span class="kwd">"coupon"</span> ,
            <span class="lit">"username"</span> : <span class="kwd">"testbrand"</span> ,
            <span class="lit">"relevant_date"</span> : <span class="kwd">"2012-07-22T14:25-08:00"</span> ,
            <span class="lit">"foreground_color"</span> : <span class="kwd">"rgb(0,0,0)"</span> ,
            <span class="lit">"background_color"</span> : <span class="kwd">"rgb(218,212,212)"</span> ,
            <span class="lit">"label_color"</span> : <span class="kwd">"rgb(254,254,255)"</span> ,
            <span class="lit">"primaryFields"</span> : [
                        { 
                        <span class="lit">"key"</span> : <span class="kwd">"key1"</span> ,
                        <span class="lit">"value"</span> : <span class="kwd">"values"</span> ,
                        <span class="lit">"label"</span> : <span class="kwd">"label"</span> 
                        }
                        ] 
            }' \
    </span>https://api.walletkit.com/v1/passes

    </pre>
    
    <p class="api_sub_header">Response :</p>
    <p class="api_details">Returns response with status 200 and json data with id of the template. You should store this id for delivering individual passes</p>
    
    <pre class="prettyprint lang-html">

    <span class="str">
        {
            <span class="lit">"id"</span> : <span class="kwd">"&lt;pass temaplate id &gt;"</span> , 
            <span class="lit">"description"</span> : <span class="kwd">"Description of the pass"</span> , 
        } 
         
	</pre>
    
    <div class="half_line"></div>
    
    <p class="api_title" id="lp">Listing all Passes</p>
    
    <p class="api_details">You may want to retrieve the id of the pass templates you have created. You can list the pass templates created by sending a http <strong>GET</strong> request to <strong>https://api.walletkit.com/v1/passes.</strong></p>
    
    <p class="api_sub_header">Headers</p>
    
    <p class="api_details">The request headers are <strong>Content-Type, brand-id</strong> and <strong>api-key</strong>. Your <strong>brand-id</strong> and <strong>api-key</strong> can be found at accounts page.</p>
    
    <pre class="prettyprint lang-html">

        -H <span class="str">"brand-id: <span class="kwd">&lt;Your brand-id&gt;</span>"  \</span>
        -H <span class="str">"api-key:  <span class="kwd">&lt;Your api-key&gt;</span> "  \</span>
    </pre>
    
    <p class="api_sub_header">Example curl request :</p>
    
    <pre class="prettyprint lang-html">

    curl -X GET  <span class="str">\</span>
        -H <span class="str">"brand-id: &lt;Your brand-id&gt;"  \</span>
        -H <span class="str">"api-key: &lt;Your api-key&gt;" \</span>
    </span>https://api.walletkit.com/v1/passes

    </pre>
    
    <p class="api_sub_header">Response</p>
    
    <p class="api_details">Returns response with status 200 and json array containing <strong>id</strong> and description of all the Pass templates you have created</p>
    
    <pre class="prettyprint lang-html">

    <span class="str">
        [
        {
            <span class="lit">"id"</span> : <span class="kwd">"&lt;pass temaplate id &gt;"</span> , 
            <span class="lit">"description"</span> : <span class="kwd">"Description of the pass"</span> , 
        }.
        {
            <span class="lit">"id"</span> : <span class="kwd">"&lt;pass temaplate id &gt;"</span> , 
            <span class="lit">"description"</span> : <span class="kwd">"Description of the pass"</span> , 
        }
        ] 
         

    </pre>
    
    <div class="half_line"></div>
    
    <p class="api_title" id="ci">Creating an indivudual pass</p>
    
    <p class="api_details">An individual Pass for your users (based on a Pass template you have created) can be sent or generated by sending a http POST request to <strong>https://api.walletkit.com/v1/passes/&lt;template_id&gt;</strong>. template_id is the id for the template pass you create manually or through our API. You can send values for the template pass by sending the key and value to be changed for the field.</p>
    
    <p class="api_sub_header">Headers</p>
    
    <p class="api_details">The request headers are <strong>Content-Type</strong>, <strong>brand-id</strong> and <strong>api-key</strong>. Content-Type should be set as <strong>application/json</strong>. Your <strong>brand-id</strong> and <strong>api-key</strong> can be found at <a href="accounts.html">accounts</a> page.</p>
    
    <pre class="prettyprint lang-html">

        -H <span class="str">"brand-id: <span class="kwd">&lt;Your brand-id&gt;</span>"  \</span>
        -H <span class="str">"api-key:  <span class="kwd">&lt;Your api-key&gt;</span> "  \</span>
        -H <span class="str">"Content-Type: application/json"  \</span>
    </pre>
    
    <p class="api_sub_header">Json POST data</p>
    
    <p class="api_details">The json key and value to be send with the POST request is documented in the table below.</p>
    
    <table class="api_table" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <th class="tb_title" colspan="5">json data</th>
    </tr>
    <tr class="tb_head">
        <td>Keys</td>
        <td>Value</td>
        <td>Description</td>
        <td>Type</td>
        <td>Required</td>
    </tr>
     <tr>
            <td class="api_table_td">keys</td>
            <td class="api_table_td">Key named 'keys' with array of json dictionaries containing attributes:<strong> key</strong>, <strong>value</strong>
            <td class="api_table_td">You just need to provide the key and value pair so that a pass will be created by finding the key from the template and replacing the value for it<br/></td>
            <td class="api_table_td">String for key and value can be String or Numeric</td>  
            <td class="api_table_td">Optional</td>      

        </tr>

         <tr>
            <td class="api_table_td">location</td>
            <td class="api_table_td">Key named 'location' with array of json dictionaries containing attributes:<strong> latitude</strong>, <strong>latitude</strong>, <strong>altitude</strong> , <strong>relevanttext</strong></td>
            <td class="api_table_td"><strong>latitude, longitude, altitude</strong> - latitude, longitude and altitude of the location. Each has a key in all the json dictionary of the Array<br/><br/>   <strong>relevanttext</strong> - Description of the location. Eg: first street on the fourth street<br/><br/>Note: Max only 10 locations are allowed per Pass.The numebr of locations you send combined with the locations for this pass tempalte should not exceed 10. if it does, the API will return an error message</td>
            <td class="api_table_td">double(<strong>latitude</strong>,<strong> longitude</strong>,<strong> altitude</strong>) String(<strong>relevanttext</strong>)</td>  
            <td class="api_table_td">Optional. but if location is present: <strong>latitude</strong>, <strong>latitude</strong> </strong> are required</td>      
        </tr>

         <tr>
            <td class="api_table_td">barcode_message</td>
            <td class="api_table_td">Message to be included in the barcode</td>
            <td class="api_table_td">Barcode message for pass</td>
            <td class="api_table_td">String</td>  
            <td class="api_table_td">Optional.Works only if the barcode format and message encoding is set in the template</td>
        </tr>

        <tr>
            <td class="api_table_td">barcode_alttext</td>
            <td class="api_table_td">Text displayed near the barcode.</td>
            <td class="api_table_td">For example, a human-readable version of the barcode data in case the barcode doesn't scan</td>
            <td class="api_table_td">String</td>  
            <td class="api_table_td">Optional.Works only if the barcode format and message encoding is set in the template</td>
        </tr>

        <tr>
            <td class="api_table_td">email</td>
            <td class="api_table_td">Valid email address to deliver the pass</td>
            <td class="api_table_td">The link to download the pass is sent to the provided email address</td>
            <td class="api_table_td">String</td>  
            <td class="api_table_td">Optional</td>
        </tr>

         <tr>
            <td class="api_table_td">emailsubject</td>
            <td class="api_table_td">Subject of the email</td>
            <td class="api_table_td">Works only if email is provided</td>
            <td class="api_table_td">String</td>  
            <td class="api_table_td">Optional.If not specified, a default subject is used</td>
        </tr>
        <tr>
            <td class="api_table_td">emailbody</td>
            <td class="api_table_td">Body of the email</td>
            <td class="api_table_td">Works only if email is provided</td>
            <td class="api_table_td">String</td>  
            <td class="api_table_td">Optional.If not specified, a default emailbody is used</td>
        </tr>

        <tr>
            <td class="api_table_td">emailname</td>
            <td class="api_table_td">Name of the user receiving the email</td>
            <td class="api_table_td">Works only if email is provided</td>
            <td class="api_table_td">String</td>  
            <td class="api_table_td">Optional.If not specified, name is not used</td>
        </tr>
      
      <tr>
            <td >icon, background, logo, thumbnail,icon,icon2x, background2x, logo2x, thumbnail2x,strip2x</td>
            <td >Image URL</td>
            <td >If specified, it will replace the image from the template for this particular pass</td>
            <td >String</td>  
            <td >Optional.If not specified, it will use the default images from the template</td>      
    

        </tr>
        
    </table>
    
    <p class="api_sub_header">Example curl request :</p>
    
    <pre class="prettyprint lang-html">

    curl -X POST  <span class="str">\</span>
        -H <span class="str">"&lt;Your brand-id&gt;"  \</span>
        -H <span class="str">"&lt;Your api-key&gt;" \</span>
        -H <span class="str">"Content-Type: application/json"  \</span>
        -d <span class="str">'{
             <span class="lit">"keys"</span> :[{ 
                        <span class="lit">"key"</span> : <span class="kwd">"Destination"</span> ,
                        <span class="lit">"value"</span> : <span class="kwd">"SFO"</span> ,
                        },
                        {
                        <span class="lit">"key"</span> : <span class="kwd">"Departure"</span> ,
                        <span class="lit">"value"</span> : <span class="kwd">"Chennai,India"</span> ,
                        }]
            <span class="lit">"location"</span> :[{ 
                        <span class="lit">"latittude"</span> : <span class="kwd">178.67</span> ,
                        <span class="lit">"longitude"</span> : <span class="kwd">167.60</span> ,
                        }
                        ]
                }' \
    </span>https://api.walletkit.com/v1/passes/&lt;template id&gt;
	</pre>
    
    <p class="api_sub_header">Response :</p>
    <p class="api_details">Returns response with status 200 and json data with <strong>details</strong> of the sent pass. You can attach the .pkpass file from the url and email to your users or send the link to them</p>
    
    <pre class="prettyprint lang-html">

    <span class="str">
        {
            <span class="lit">"url"</span> : <span class="kwd">htps://s3.amazonaws.com/passes.pkpass/"&lt;serial no&gt;".pkpass</span> , 
            <span class="lit">"description"</span> : <span class="kwd">"Description of the pass"</span> , 
             <span class="lit">"sent_pass"</span> :{ 
                        <span class="lit">"authentication_token"</span> : <span class="kwd">"&lt;secure auth token&gt;"</span> ,
                        <span class="lit">"serial_no"</span> : <span class="kwd">"&lt;serial no&gt;"</span> ,
                        <span class="lit">"createddate"</span> : <span class="kwd">""</span>,
                          <span class="lit">"short_url" </span> : <span class="kwd">"&lt;short url to download the pass&gt;"</span>,
                          <span class="lit">"email_info"</span> : <span class="kwd">"&lt;Boolean&gt;"</span>
                         }
         } 
         

    </pre>
    
    <div class="half_line"></div>
    
    <p class="api_title" id="lt">Listing Pass template</p>
    <p class="api_details">You may want to retrieve all the fields of the pass template you have created. You can list a pass template created by sending a http <strong>GET</strong> request to <strong>https://api.walletkit.com/v1/passes/&lt;template_id&gt;</strong>.</p>
    
    <p class="api_sub_header">Headers</p>
    <p class="api_details">The request headers are <strong>brand-id</strong> and <strong>api-key</strong>Your <strong>brand-id</strong> and <strong>api-key</strong> can be found at <a href="accounts.html">accounts</a> page.</p>
    
    <pre class="prettyprint lang-html">

        -H <span class="str">"brand-id: <span class="kwd">&lt;Your brand-id&gt;</span>"  \</span>
        -H <span class="str">"api-key:  <span class="kwd">&lt;Your api-key&gt;</span> "  \</span>
    </pre>
    
    <p class="api_sub_header">Example curl request :</p>
    
    <pre class="prettyprint lang-html">

    curl -X GET  <span class="str">\</span>
        -H <span class="str">"brand-id: &lt;Your brand-id&gt;"  \</span>
        -H <span class="str">"api-key: &lt;Your api-key&gt;" \</span>
    </span>https://api.walletkit.com/v1/passes/&lt;template_id&gt;

    </pre>
    
    <p class="api_sub_header">Response</p>
    <p class="api_details">Returns response with status 200 and json array containing details of the Pass template you have requested for. it returns all the fields and data associated with the Pass template</p>
    
    <div class="half_line"></div>
    
    <p class="api_title" id="dt">Deleting a Pass template</p>
    <p class="api_details">You can delete a pass template by sending a delete http <strong>DELETE</strong> request to <strong>https://api.walletkit.com/v1/passes/&lt;template_id&gt;</strong></p>
    
    <p class="api_sub_header">Headers</p>
    <p class="api_details">The request headers are <strong>brand-id</strong> and <strong>api-key</strong>Your <strong>brand-id</strong> and <strong>api-key</strong> can be found at <a href="accounts.html">accounts</a> page.</p>
    
    <pre class="prettyprint lang-html">

        -H <span class="str">"brand-id: <span class="kwd">&lt;Your brand-id&gt;</span>"  \</span>
        -H <span class="str">"api-key:  <span class="kwd">&lt;Your api-key&gt;</span> "  \</span>
    </pre>
    
    <p class="api_sub_header">Example curl request :</p>
    
    <pre class="prettyprint lang-html">

    curl -X DELETE  <span class="str">\</span>
        -H <span class="str">"brand-id: &lt;Your brand-id&gt;"  \</span>
        -H <span class="str">"api-key: &lt;Your api-key&gt;" \</span>
    </span>https://api.walletkit.com/v1/passes/&lt;template_id&gt;
	</pre>
    
    <div class="half_line"></div>
    
    <p class="api_title" id="up">Updating a Pass</p>
    <p class="api_details">You can filter list of individual active passes you have sent by its key and values. You can send the key and value of the pass template to be filtered by by making a http <strong>PUT</strong> request to <strong>https://api.walletkit.com/v1/passes/&lt;template_id&gt; </strong>. template_id is the id for the template pass you create manually or through our API.</strong></p>
    
    <p class="api_sub_header">Headers</p>
    <p class="api_details">The request headers are <strong>Content-Type</strong>, <strong>brand-id</strong> and <strong>api-key</strong>. Content-Type should be set as <strong>application/json</strong>. Your <strong>brand-id</strong> and <strong>api-key</strong> can be found at <a href="accounts.html">accounts</a> page.</p>
    
    <pre class="prettyprint lang-html">

        -H <span class="str">"brand-id: <span class="kwd">&lt;Your brand-id&gt;</span>"  \</span>
        -H <span class="str">"api-key:  <span class="kwd">&lt;Your api-key&gt;</span> "  \</span>
        -H <span class="str">"Content-Type: application/json"  \</span>
    </pre>
    
    <p class="api_sub_header">Json POST data</p>
    <p class="api_details">The json key and value to be send with the POST request is documented in the table below.</p>
    
    <table class="api_table" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <th class="tb_title" colspan="5">json data</th>
    </tr>
    <tr class="tb_head">
        <td>Keys</td>
        <td>Value</td>
        <td>Description</td>
        <td>Type</td>
        <td>Required</td>
    </tr>
    <tr>
            <td class="api_table_td">keys</td>
            <td class="api_table_td">Key named 'keys' with array of json dictionaries containing attributes:<strong> key</strong>, <strong>value</strong> and Key named 'updatekeys' with array of json dictionaries containing attributes:<strong> key</strong>, <strong>value</strong>.updatekey will update the value mentioned for the keys in <strong>updatekeys</strong>
            <td class="api_table_td">You need to provide the key and value pair so that passes will be filtered based on the key and value. eg:filtering all the passes for key flight no with a value and updating the gate no key.<br/><br/> See example below the table to make sense of it</td>
            <td class="api_table_td">String for key and value can be String or Numeric</td>  
            <td class="api_table_td">Optional</td>      

        </tr>

     <tr>
            <td class="api_table_td">updatekeys</td>
            <td class="api_table_td">Array of json dictionaries containing attributes:<strong> key</strong>, <strong>value</strong>.It will update the value mentioned for the keys
            <td class="api_table_td">Ex:filter passes with flight-no:1367 and update key boarding-gate to 42</td>
            <td class="api_table_td">String for key and value can be String or Numeric</td>  
            <td class="api_table_td">Optional</td>      

        </tr>

    </table>
    
    <p class="api_sub_header">Example curl request :</p>
    
    <pre class="prettyprint lang-html">

    curl -X PUT  <span class="str">\</span>
        -H <span class="str">"&lt;Your brand-id&gt;"  \</span>
        -H <span class="str">"&lt;Your api-key&gt;" \</span>
        -H <span class="str">"Content-Type: application/json"  \</span>
        -d <span class="str">'{
             <span class="lit">"id"</span> : <span class="kwd">"&lt;pass temaplate id &gt;"</span> , 
            <span class="lit">"description"</span> : <span class="kwd">"Description of the pass"</span> , 
             <span class="lit">"keys"</span> :[{ 
                        <span class="lit">"key"</span> : <span class="kwd">"Destination"</span> ,
                        <span class="lit">"value"</span> : <span class="kwd">"SFO"</span> ,
                        },
                        {
                        <span class="lit">"key"</span> : <span class="kwd">"Departure"</span> ,
                        <span class="lit">"value"</span> : <span class="kwd">"Chennai,India"</span> ,
                        }]
             <span class="lit">"updatekeys"</span> :[
                        {
                        <span class="lit">"key"</span> : <span class="kwd">"Departure"</span> ,
                        <span class="lit">"value"</span> : <span class="kwd">"Mumbai,India"</span> ,
                        }]
                
            }' \
    </span>https://api.walletkit.com/v1/passes/&lt;template id&gt;

    </pre>
    
    <p class="api_sub_header">Response</p>
    <p class="api_details">Returns response with status 200 and json data with <strong>details</strong> of the sent pass. You can attach the .pkpass file from the url and email to your users or send the link to them</p>
    
    <pre class="prettyprint lang-html">

    <span class="str">
        {
            <span class="lit">"url"</span> : <span class="kwd">htps://s3.amazonaws.com/passes.pkpass/"&lt;serial no&gt;".pkpass</span> , 
            <span class="lit">"description"</span> : <span class="kwd">"Description of the pass"</span> , 
             <span class="lit">"sent_pass"</span> :{ 
                        <span class="lit">"authentication_token"</span> : <span class="kwd">"&lt;secure auth token&gt;"</span> ,
                        <span class="lit">"serial_no"</span> : <span class="kwd">"&lt;serial no&gt;"</span> ,
                        <span class="lit">"createddate"</span> : <span class="kwd">""</span>
                         }
         } 
         
	</pre>
    


    <div class="half_line" id="bp"></div>
    
    <p class="api_title" >Boarding Pass</p>

<p class="api_details">
         The following layout describes how a boarding pass will be displayed. 

</p>
<p class="api_sub_header">Supported Images</p>
  
    <p class="api_details">
     logo, icon and footer

</p>


<p class="api_sub_header">Fields</p>
  
    <p class="api_details">
    Header Fields    - upto 3 fields allowed 
    </p>
        <p class="api_details">
    Primary Fields   - upto 2 fields allowed
</p>
        <p class="api_details">

    Secondary Fields - upto 4 fields allowed
</p>
        <p class="api_details">

    Auxiliary Fields - upto 5 fields allowed

</p>



<p class="api_sub_header">Layout</p>

            <center>
        <img src="static/images/boarding_layout.png">
            </center>
         <div class="half_line" id="et"></div>



 <p class="api_title" >Event Tickets</p>

<p class="api_details">
         The following layout describes how an event ticket pass will be displayed. 
</p>

<p class="api_sub_header">Supported Images</p>
  
    <p class="api_details">
   logo, icon, strip, background, thumbnail.
   If you specify a strip image, do not specify a background image or a thumbnail.

</p>

<p class="api_sub_header">Fields</p>
  
    <p class="api_details">
    Header Fields    - upto 3 fields allowed 
    </p>
        <p class="api_details">
    Primary Fields   - only 1 field allowed
</p>
        <p class="api_details">

    Secondary Fields - upto 4 fields allowed
</p>
        <p class="api_details">

    Auxiliary Fields - upto 4 fields allowed

</p>

    
        <p class="api_sub_header">Layout Type 1</p>

            <center>
        <img src="static/images/event1_layout.png">
            </center>


    <p class="api_sub_header">Layout Type 2</p>

             <center>
        <img src="static/images/event2_layout.png">
            </center>
         <div class="half_line" id="sc"></div>



<p class="api_title" >Store Card</p>

<p class="api_details">
         The following layout describes how a store card pass will be displayed. 
</p>
    


    <p class="api_sub_header">Supported Images</p>
  
    <p class="api_details">
   logo, icon, strip
  </p>

<p class="api_sub_header">Fields</p>
  
    <p class="api_details">
    Header Fields    - upto 3 fields allowed 
    </p>
        <p class="api_details">
    Primary Fields   - only 1 field allowed
</p>
        <p class="api_details">

    Secondary Fields and Auxiliary Fields  - upto a total of up to four secondary and auxiliary fields, combined.
</p>
 


            <center>
        <img src="static/images/storecard_layout.png">
            </center>

         <div class="half_line" id="cop"></div>

 <p class="api_title" >Coupon</p>

<p class="api_details">
         The following layout describes how a coupon pass will be displayed. Maximum four secodaryField/auxiliaryField combined.
</p>

 <p class="api_sub_header">Supported Images</p>
  
    <p class="api_details">
   logo, icon, strip
  </p>

<p class="api_sub_header">Fields</p>
  
    <p class="api_details">
    Header Fields    - upto 3 fields allowed 
    </p>
        <p class="api_details">
    Primary Fields   - only 1 field allowed
</p>
        <p class="api_details">

    Secondary Fields and Auxiliary Fields  - upto a total of up to four secondary and auxiliary fields, combined.
</p>
 

    
            <center>
        <img src="static/images/coupon_layout.png">
            </center>

         <div class="half_line" id="gen"></div>

 <p class="api_title" >Generic</p>

<p class="api_details">
         The following layout describes how a generic pass will be displayed.  
</p>
    
 <p class="api_sub_header">Supported Images</p>
  
    <p class="api_details">
   logo, icon, thumbnail
  </p>

<p class="api_sub_header">Fields</p>
  
    <p class="api_details">
    Header Fields    - upto 3 fields allowed 
    </p>
        <p class="api_details">
    Primary Fields   - only 1 field allowed
</p>
        <p class="api_details">

    Secondary Fields and Auxiliary Fields  - upto a total of up to four secondary and auxiliary fields, combined.
</p>
 
 

        <p class="api_sub_header">Layout Type 1</p>

            <center>
        <img src="static/images/generic1_layout.png">
            </center>


    <p class="api_sub_header">Layout Type 2</p>
             <center>
        <img src="static/images/generic2_layout.png">
            </center>

       

            </div><!-- end .api_wrap -->
				
            </div><!-- end .right_wraper -->
            
          
            
        </div><!-- end .right_content -->
        
	</div><!-- end .container -->

    
<script type="text/javascript">
$(document).ready(function() {


	var lastScrollTop = 0;
	$('#scroll_shadow').hide();
	$('#scroll_wrapper').scroll(function(){
		var st = $('#scroll_wrapper').scrollTop();
		
		if(st>lastScrollTop){
			//scrolled down
			$('#scroll_shadow').fadeIn("fast");
		}
		else if(st<lastScrollTop && st == 0){
			$('#scroll_shadow').fadeOut("fast");
		}
		lastScrollTop = st;
	});

$('.s_nav').bind("click", function(){
  
   $('.s_nav li').removeClass('selected');
   $(this).children('li').addClass('selected');




});

});
</script>
</body>

<!-- Mirrored from www.walletkit.com/docs by HTTrack Website Copier/3.x [XR&CO'2010], Sat, 01 Dec 2012 19:13:12 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
</html>